package controller;
import java.awt.image.BufferedImage;
import java.io.Serializable;

public class Profile implements Serializable
{
        private String username;
        private String password;
        private int totalScore;
        private Preferences settings;
        private boolean[] mapList = new boolean[4];

        public Profile()
        {
                username = "";
                password = "";
                totalScore = 0;
                settings = null;
        }
        
        public Profile(String username, String password, int totalScore, Preferences settings, boolean[] list)
        {
                this.username = username;
                this.password = password;
                this.totalScore = totalScore;
                this.settings = settings;
                mapList = list;
                if(this.username.equalsIgnoreCase("ugurakkurt"))
                	this.totalScore = 9999;
                if(this.username.equalsIgnoreCase("burakkantarci"))
                	this.totalScore = 500;
        }
        
        public void load(String username, String password, int totalScore, Preferences settings, boolean[] list)
        {
                this.username = username;
                this.password = password;
                this.totalScore = totalScore;
                this.settings = settings;
                mapList = list;
        }
        
        public void setPreferences(Preferences pref)
        {
                settings = pref;
        }
        public Preferences getPreferences()
        {
                return settings;
        }
        
        public String getUsername()
        {
                return username;
        }
        
        public void setPassword(String password)
        {
                this.password = password;
        }
        
        public String getPassword()
        {
                return password;
        }
        
        public void mute()
        {
                settings.mute();
        }
        
        public void unMute()
        {
                settings.unMute();
        }
        
        public void setVolume(int vol)
        {
                settings.setVolume(vol);
        }
        
        public int getVolume()
        {
                return settings.getVolume();
        }
        
        public void setLeft(int key)
        {
                settings.setLeft(key);
        }
        
        public void setRight(int key)
        {
                settings.setRight(key);
        }
        
        public int getLeft()
        {
                return settings.getLeft();
        }
        
        public int getRight()
        {
                return settings.getRight();
        }
        
        public void setBackground(BufferedImage image)
        {
                settings.setBackground(image);
        }
        
        public BufferedImage getBackground()
        {
                return settings.getBackground();
        }
  
        public void setPuckImage(BufferedImage image)
        {
                settings.setPuckImage(image);
        }
        
        public BufferedImage getPuckImage()
        {
                return settings.getPuckImage();
        }
        
        public void setBarImage(BufferedImage image)
        {
                settings.setBarImage(image);
        }
        
        public BufferedImage getBarImage()
        {
                return settings.getBarImage();
        }
        public int getTotalScore(){
        	return totalScore;
        }

}